<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>一楼网</title>

        <!-- ALL STYLESHEET -->
        <link href="/TOP2/Public/index/bootstrap/css/bootstrap.min.css" rel="stylesheet">
		<link href="/TOP2/Public/index/css/font-awesome.min.css" rel="stylesheet">
		<link href="/TOP2/Public/index/css/style.css" rel="stylesheet">
		<link href="/TOP2/Public/index/css/style2.css" rel="stylesheet">
		<link href="/TOP2/Public/index/css/responsive.css" rel="stylesheet">
		<!--link href="css/blog-single.css" rel="stylesheet">
		<link href="css/responsive.css" rel="stylesheet"-->
    </head>   
	<body>
		
		<!-- header -->
		<header class="header">
			
			<!-- header top -->
			<div class="header-top">
				<div class="container">
					<div class="row">
						<div class="col-sm-3">
							<ul class="list-inline">
								<li>
									<div class="dropdown">
										<a class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><img  src="/TOP2/Public/index/images/is.png" alt="" /> English <i class="fa fa-angle-down"></i></a>
										<ul class="dropdown-menu">
											<li><a href="#">Japani</a></li>
											<li><a href="#">Hindi</a></li>
											<li><a href="#">中国</a></li>
										</ul>
									</div>
								</li>
								<li>
									<div class="dropdown">
										<a class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Currency $USD <i class="fa fa-angle-down"></i></a>
										<ul class="dropdown-menu">
											<li><a href="#">Pound</a></li>
											<li><a href="#">Diner</a></li>
											<li><a href="#">Rupee</a></li>
										</ul>
									</div>
								</li>
							</ul>
						</div>
						<div class="col-sm-4">
							<ul class="list-inline">
								<li><a href="#" ><i class="fa fa-mobile"></i> +15821203194</a></li>
								<li><a href="#" ><i class="fa fa-envelope-o"></i> maidi_wen@163.com</a></li>
							</ul>	
						</div>
						<div class="col-sm-5">
							<ul class="list-inline pull-right">
								<li><a href="<?php echo U('Cart/index');?>" ><i class="glyphicon glyphicon-shopping-cart"></i> My Cart</a></li>
								<!-- 判断session['user'] 是否为空， -->
								<?php if(empty($_SESSION['user'])): ?><li><a href="<?php echo U('Login/index');?>" ><i class="glyphicon glyphicon-user"></i> Login</a></li>
									<li><a href="#" ><i class="glyphicon glyphicon-pencil"></i> Regstered</a></li>
								<?php else: ?>						<!-- 如果不为空则输出用户名 -->
								<li><a class="register" href="<?php echo U('Cart/orderdetails');?>" >VIP <?php echo ($_SESSION['user']['name']); ?></a></li>
								<li><a href="<?php echo U('Login/Loginout');?>"><i class="glyphicon glyphicon-off"></i> 退出</a></li><?php endif; ?>

							</ul>	
						</div>	
					</div>	
				</div>
			</div>
			
			<!-- logo and adds -->
			<div class="logo-add">
				<div class="container">
					<div class="row">
						<div class="col-sm-4">
							<div class="logo"><i class="fa fa-diamond"></i>Ground floor Net</div>
						</div>
						<div class="col-sm-8">
							<h3 class="add bb-year-end-ribbon hidden-xs"><img src="/TOP2/Public/index/images/red-tablet.png" width="40px;" alt="" /> 
							<span>一楼网打造</span></span>全球品牌<button class="btn btn-default"> 点击 加入 </button></h3>
						</div>
					</div>
				</div>
			</div>
			
			<!-- header bottom -->
			<div class="header-bottom">
				<div class="row">
					<div class="col-sm-12">
						<nav class="navbar navbar-default">
							<div class="container">
								<!-- Brand and toggle get grouped for better mobile display -->
								<div class="navbar-header">
									<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-bottom" aria-expanded="false">
										<span class="sr-only">Toggle navigation</span>
										<span class="icon-bar"></span>
										<span class="icon-bar"></span>
										<span class="icon-bar"></span>
									</button>
								</div>

								<!-- Collect the nav links, forms, and other content for toggling -->
								<div class="collapse navbar-collapse" id="header-bottom">
									<ul class="nav navbar-nav">
										<li class="active"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Home</a></span>
											<ul class="dropdown-menu">
												<li><a href="<?php echo U('Index/index');?>">Home Page</a></li>
												<li><a href="<?php echo U('Cart/index');?>">Home Page 2</a></li>
											</ul>	
										</li>
										<li><a href="<?php echo U('Cart/index');?>" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Shop</a><span class="label label-danger text-center hidden-xs">New <i class="fa fa-caret-right"></i></span>
											<ul class="dropdown-menu">
												<li><a href="<?php echo U('Cart/index');?>">Products</a></li>
											
												<li><a href="<?php echo U('Cart/index');?>">New Products</a></li>
											</ul>	
										</li>
										<li><a href="<?php echo U('Cart/index');?>">CART</a></li>
										<li><a href="<?php echo U('Cart/index');?>">Blog Detail</a></li>
										<li><a href="<?php echo U('Cart/index');?>">About Us</a> <span class="label label-info text-center hidden-xs">New <i class="fa fa-caret-right"></i></span></li>
										<li><a href="<?php echo U('Cart/index');?>">Contac Us</a></li>
										<li><a href="<?php echo U('Cart/index');?>">FAQ</a></li>
									</ul>
									<form class="navbar-form navbar-right" role="search">
										<div class="form-group">
											<input type="text" class="form-control" placeholder="搜索...">
											<span class="nav-search"><a href="#"><i class="fa fa-search"></i></a></span>
										</div>	
									</form>
								</div>
							</div>
						</nav>
					</div>	
				</div>	
			</div>	
		</header>	
			
		
		<!-- desktop bar -->
		<section class="desktop-bar">
			<div class="container">
				<div class="row">
					<div class="col-sm-4">
					 <h3>Cart</h3>
					</div>
					<div class="col-sm-8">
						<ol class="breadcrumb hidden-xs pull-right">
							<li><a href="#">Home</a></li>
							<li class="active"><a href="#">Cart</a></li>
						</ol>
					</div>
				</div>
			</div>
		</section>
		
		<!-- FAQ -->
		<section>
			<div class="container">
				<div class="row">
					<div class="col-sm-12">
						<a href=""><h2 class="t-color-6">订单</h2></a>
						<div class="heading1 b-color-6"></div>

						<div class="panel-group ques-ask" id="accordion" role="tablist" aria-multiselectable="true">
						
							<div class="panel panel-default">
								<div class="panel-heading" role="tab" id="headingOne">
									<h4 class="panel-title">
										<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-1" aria-expanded="true" aria-controls="collapse-1">提交订单<span class="glyphicon glyphicon-menu-hamburger"></span></a>
									</h4>
								</div>
								<div class="addre_add" id="add">
									<div class="addre_add1">
										<span style="color:#FF5500">新增收货地址</span>　电话号码、手机号选填一项,其余均为必填项
									</div>
									<!-- 添加购物地址 -->
									<form action="<?php echo U('Cart/addres');?>" method="post">
										<div class="input-group">
										  <span class="input-group-addon" id="basic-addon1">地址</span>
										  <input type="text" name="address" class="form-control" placeholder="请输入具体地址" aria-describedby="basic-addon1">
										</div>
										<div class="input-group">
										  <span class="input-group-addon" id="basic-addon1">电话</span>
										  <input type="text" name="tel" class="form-control" placeholder="请输入手机号码" aria-describedby="basic-addon1">
										</div>
										<div class="input-group">
										  <span class="input-group-addon" id="basic-addon1">邮编</span>
										  <input type="text" name="code" class="form-control" placeholder="请输入邮编" aria-describedby="basic-addon1">
										</div>
										 <button type="submit" class="btn btn-default">提交地址</button>
									</form>
								</div>
								<form action="<?php echo U('Cart/docart');?>" method="post"> <!-- 结算订单 -->
								<div id="collapse-1" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
									<!-- 地址栏 -->
									<div class="panel_cart_tables">
										<div class="panel_cart_tabled">
										收货地址:
										<span class="panel_span" id="addre">添加新地址</span>
										</div>
									<?php if(is_array($addre)): foreach($addre as $key=>$vad): ?><div class="address">
										<label>
											<input type="radio" name="add_id" checked="checked" value="<?php echo ($vad['id']); ?>">
											<span class="address_intput_span">
												<?php echo ($vad['address']); ?>&nbsp;<?php echo ($vad['tel']); ?>&nbsp;<?php echo ($vad['code']); ?>
											</span>
										</label>
										</div>
										<div class="hrs"></div><?php endforeach; endif; ?>	
									</div>
									<div class="panel-body">
										<div class="panelbody">
											<ul>
												<li class="body_li1"><input type="checkbox">全选</li>
												<li class="body_li2">商品信息</li>
												<li class="body_li3">规格</li>
												<li class="body_li4">单价（元）</li>
												<li class="body_li5">数量</li>
												<li class="body_li6">金额（元）</li>
												<li class="body_li7">操作</li>
											</ul>
										</div>
										<div class="panel_cart">
											<!-- 用来计算总数量的预定值 -->	
											<?php $total = '0'; ?>						
											<!-- 用来计算总价格的预定值 -->
											<?php $totalprice = '0'; ?>
											<!-- 判断购物车是否为空 如果为空 -->
										<?php if(empty($session)): ?><span class="order_shop">你还没有商品<a href="<?php echo U('Index/index');?>">去购物</a></span>
										<?php else: ?> <!-- 不为空 -->
												<!-- 购物商品遍历开始 -->
											<?php if(is_array($session)): foreach($session as $key=>$value): ?><div class="panel_cart_table2">
												<ul>
													<li class="panel_cart1">
														<input type="checkbox" name="chebox1" class="chebox1">
														<img src="/TOP2/Public/index/images/1.jpg" class="chebox1_img">
													</li>
													<li class="panel_cart2"><?php echo ($value['gname']); ?></li>
													<li class="panel_cart3">商品规格</li>
													<li class="panel_cart4"><?php echo ($value['gp']); ?></li>
													<li class="panel_cart5"><?php echo ($value['num']); ?></li>
													<li class="panel_cart6"><?php echo ($value['num']*$value['gp']); ?>.00</li>
													<li class="panel_cart7"><a href="<?php echo U('Cart/delete',array('id'=>$value['gid']));?>"><span class="glyphicon glyphicon-trash"></span></a></li>
													<!-- 计算所有商品的数量 -->
													<?php $total = $total += $value['num']; ?>
													<!-- 计算所有商品的总价格 -->
													<?php $totalprice = $totalprice += ($value['num']*$value['gp']); ?>
												</ul>
											</div>
											<hr><?php endforeach; endif; ?>
											<!-- 购物商品遍历结束 -->
											<input type="submit" value="结算" class="btn btn-danger danger1">
											<a href="<?php echo U('Cart/emptys',array('id'=>$value['gid']));?>" class="danger2"><span class="glyphicon glyphicon-trash "></span><span class="danger2_span">清空</span></a>
											<span class="shop_span">合计： <b style="color:red;font-size:17px">¥<?php echo ($totalprice); ?> </b>元</span><?php endif; ?>
											
										</div>
									</div>
								</div>
								</form><!-- 结算订单结束 -->
							</div>
						</div>
					</div>
				</div>
			</div>
		</section>
		<!-- sponsor -->
		<section class="sponsor">
			<div class="container">			
				<div id="sponsor" class="carousel slide" data-ride="carousel">
					<div class="carousel-inner" role="listbox">
						<div class="item active">
							<div class="row">	
								<div class="col-sm-12">
									<ul class="list-inline text-center">
										<li><img class="" src="/TOP2/Public/index/images/1.gif" /></li>
										<li><img class="" src="/TOP2/Public/index/images/2.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/3.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/4.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/5.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/6.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/7.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/8.png" /></li>
									</ul>
								</div>
							</div>
						</div>
						<div class="item">
							<div class="row">	
								<div class="col-sm-12">
									<ul class="list-inline text-center">
										<li><img class="" src="/TOP2/Public/index/images/1.gif" /></li>
										<li><img class="" src="/TOP2/Public/index/images/2.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/3.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/4.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/5.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/6.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/7.png" /></li>
										<li><img class="" src="/TOP2/Public/index/images/8.png" /></li>
									</ul>
								</div>
							</div>
						</div>
					</div>
					<!-- Controls -->
				<a class="control-left" href="#sponsor" role="button" data-slide="prev"><i class="fa fa-angle-left"></i></a>
				<a class="control-right" href="#sponsor" role="button" data-slide="next"><i class="fa fa-angle-right"></i></a>
				</div>			
			</div>
		</section>	
		
		<!-- social icons -->
		<section class="social-icons">
			<div class="container">			
				<div class="row">	
					<div class="col-sm-12">
						<ul class="list-inline text-center">
							<li><a href="#" ><i class="fa fa-facebook"></i></a></li>
							<li><a href="#" ><i class="fa fa-spotify"></i></a></li>
							<li><a href="#" ><i class="fa fa-tumblr"></i></a></li>
							<li><a href="#" ><i class="fa fa-share-alt"></i></a></li>
							<li><a href="#" ><i class="fa fa-linkedin"></i></a></li>
							<li><a href="#" ><i class="fa fa-delicious"></i></a></li>
							<li><a href="#" ><i class="fa fa-instagram"></i></a></li>
							<li><a href="#" ><i class="fa fa-dropbox"></i></a></li>
							<li><a href="#" ><i class="fa fa-soundcloud"></i></a></li>
							<li><a href="#" ><i class="fa fa-pinterest"></i></a></li>
							<li><a href="#" ><i class="fa fa-google-plus"></i></a></li>
							<li><a href="#" ><i class="fa fa-github-alt"></i></a></li>
							<li><a href="#" ><i class="fa fa-skype"></i></a></li>
							<li><a href="#" ><i class="fa fa-stumbleupon"></i></a></li>
							<li><a href="#" ><i class="fa fa-youtube"></i></a></li>
						</ul>
					</div>
				</div>
			</div>
		</section>	
		
		<footer>
			<div class="footer-top">
				<div class="container">			
					<div class="row">	
						<div class="col-sm-3">
							<h2>About E-Market</h2>
							<div class="heading-border b-color-1"></div>
							<p>Nam apeirian assentior ei, utquo eros posse verterem. Cum eu error congue saperet. Te eam exerci vulputate consetetur, 								causae consulatu eaper,  apeirian assentior ei, utquo eros posse verterem. Cum eu error congue saperet. Te eam exerci 								vulputate consetetur, causae consulatu eaper</p>
							<div><a href="">Read More <i class="fa fa-angle-double-right"></i></a></div>
							<strong>Newsletter</strong>
							<!-- <form class="navbar-for" role="email">
								<div class="form-group">
									<input type="text" class="form-control" placeholder="Email Address">
									<span class="nav-search"><a href="#"><i class="fa fa-envelope"></i></a></span>
								</div>	
							</form> -->
							<small>Eros posse verterem congue saperet.</small>
						</div>
						<div class="col-sm-3">
							<h2>Featured Products</h2>
							<div class="heading-border b-color-1"></div>
							<ul class="media-list">
								<li class="media">
									<div class="media-left"><img src="/TOP2/Public/index/images/featured-1.jpg" alt=""></div>
									<div class="media-body">
										<p class="media-heading">Lorem ipsum dolor sit amet</p>
										<div class="category">
											<i class="fa fa-star"></i>
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star-o"></i>
										</div>
										<strong>$899.99</strong>
									</div>
								</li>
								<li class="media">
									<div class="media-left"><img src="/TOP2/Public/index/images/featured-1.jpg" alt=""></div>
									<div class="media-body">
										<p class="media-heading">Lorem ipsum dolor sit amet</p>
										<div class="category">
											<i class="fa fa-star"></i>
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star-o"></i>
										</div>
										<strong>$899.99</strong>
									</div>
								</li>
								<li class="media">
									<div class="media-left"><img src="/TOP2/Public/index/images/featured-1.jpg" alt=""></div>
									<div class="media-body">
										<p class="media-heading">Lorem ipsum dolor sit amet</p>
										<div class="category">
											<i class="fa fa-star"></i>
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star-o"></i>
										</div>
										<strong>$899.99</strong>
									</div>
								</li>
							</ul>
						</div>
						<div class="col-sm-3">
							<h2>Latest News</h2>
							<div class="heading-border b-color-1"></div>
							<ul class="media-list">
								<li class="media">
									<div class="media-left text-center">
										<img src="/TOP2/Public/index/images/featured-1.jpg" alt="">
										<span><i class="fa fa-search"></i></span>
									</div>
									<div class="media-body">
										<p class="f-border">Lorem ipsum dolor sit amet, an animal feugait</p>
										<p class="f-date">23 August 2015</p>
									</div>
								</li>
								<li class="media">
									<div class="media-left text-center">
										<img src="/TOP2/Public/index/images/featured-1.jpg" alt="">
										<span><i class="fa fa-search"></i></span>
									</div>
									<div class="media-body">
										<p class="f-border">Lorem ipsum dolor sit amet, an animal feugait</p>
										<p class="f-date">23 August 2015</p>
									</div>
								</li>
								<li class="media">
									<div class="media-left text-center">
										<img src="/TOP2/Public/index/images/featured-1.jpg" alt="">
										<span><i class="fa fa-search"></i></span>
									</div>
									<div class="media-body">
										<p class="f-border">Lorem ipsum dolor sit amet, an animal feugait</p>
										<p class="f-date">23 August 2015</p>
									</div>
								</li>
							</ul>
						</div>
						<div class="col-sm-3">
							<h2>Contact us</h2>
							<div class="heading-border b-color-1"></div>
							<strong class="media-heading">Address</strong>
							<p>Lebel 2, 13 Elezabe St, Melbounire, Victoria 3000, +8492575, USA</p>

							<strong class="media-heading">Phone & Fax</strong>
							<p>+880183947930</p>
							<p>+(980)1839479</p>

							<strong class="media-heading">E-Mail Address</strong>
							<p>support@gmail.com</p>
							<p>example@gmail.com</p>
						</div>
					</div>
				</div>
			</div>
			<div class="footer-bottom">
				<div class="container">		
					<div class="row">	
						<div class="col-sm-12 text-center">
							<p>Copyright 2015 made by <a href="#">Bootultra.com</a> & Disign by Shaifuddin. All Rights Reserved.</p>
							<ul class="list-inline center-block">
								<li><a href="#"><img src="/TOP2/Public/index/images/card-1.png"></a></li>
								<li><a href="#"><img src="/TOP2/Public/index/images/card-2.png"></a></li>
								<li><a href="#"><img src="/TOP2/Public/index/images/card-3.png"></a></li>
								<li><a href="#"><img src="/TOP2/Public/index/images/card-4.png"></a></li>
								<li><a href="#"><img src="/TOP2/Public/index/images/card-5.png"></a></li>
							</ul>
						</div>
					</div>
				</div>	
			</div>
		</footer>
			
        <!-- ALL JAVASCRIPT -->         
        <script src="/TOP2/Public/index/js/jquery.js"></script>
        <script src="/TOP2/Public/index/bootstrap/js/bootstrap.min.js"></script>
        <script src="/TOP2/Public/index/js/custom.js"></script>
		<script>
				var Oadd=document.getElementById('add');
				var Oaddre=document.getElementById('addre');
				var Oin=document.getElementById('in');
				
					Oaddre.onclick=function(){
						Oadd.style.display='block';
					}
					Ofo.onclick=function(){
						Oinfo.style.display='none';
						Oinfoo.style.display='block';
						

					}
		</script>
    </body>
</html>